package com.yaosheng.thread;

import java.util.concurrent.locks.ReentrantLock;

/**
 * Created by yaosheng on 2021/6/30.
 */
public class test {

    private static volatile int i = 0;

    public static void main(String[] args) {

        ReentrantLock lock = new ReentrantLock ();
        lock.lock ();
        i ++;
        lock.unlock ();

    }
}
